<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="SQLike.js"></script>
<script type="text/javascript">
var data = [];
for(var i= 0 ;i< 100;i++){
	data.push({id:i, name:"name"+ i});
}
var result = SQLike.q(
		{
			Select:['*'],
			From:data,
			Where:function(){return this.id>80},
			OrderBy:['id','|desc|']
		}	
)
//alert(result[0].name);
//alert(result[result.length-1].name);
alert(result[0].name);
alert(result[result.length-1].name);
</script>
</head>
<body>

</body>
</html>